博看听书[听].js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. var rule = {
  2. 类型: '听书',
  3. title: '博看听书',
  4. host: 'https://api.bookan.com.cn',
  5. homeUrl: '/voice/book/list?instance_id=25304&page=1&category_id=1305&num=24',
  6. url: '/voice/book/list?instance_id=25304&page=fypage&category_id=fyclass&num=24',
  7. detailUrl: '/voice/album/units?album_id=fyid&page=1&num=200&order=1',
  8. searchUrl: 'https://es.bookan.com.cn/api/v3/voice/book?instanceId=25304&keyword=**&pageNum=fypage&limitNum=20',
  9. searchable: 2,
  10. quickSearch: 0,
  11. class_name: '少年读物&儿童文学&国学经典&文艺少年&育儿心经&心理哲学&青春励志&历史小说&故事会&音乐戏剧&相声评书',
  12. class_url: '1305&1304&1320&1306&1309&1310&1307&1312&1303&1317&1319',
  13. headers: {'User-Agent': 'MOBILE_UA'},
  14. 推荐: '*',
  15. 一级: 'json:data.list;name;cover;extra.author;id',
  16. 二级: `js:
  17. let d = [];
  18. VOD = {
  19. vod_url: input,
  20. vod_name: "",
  21. vod_actor: "",
  22. vod_year: "",
  23. vod_director: ""
  24. };
  25. let playlists = [];
  26. let data = JSON.parse(request(input)).data;
  27. VOD.vod_name = data.list[0].id;
  28. VOD.vod_actor = "▶️创建于" + data.list[0].created_at;
  29. VOD.vod_year = data.list[0].created_at.split("-")[0];
  30. VOD.vod_director = "▶️更新于" + data.list[0].updated_at;
  31. let total = data.total;
  32. playlists = data.list;
  33. if (total > 200) {
  34. for (let i = 2; i < total / 200 + 1; i++) {
  35. let listUrl = input.split("&")[0] + "&page=" + i + "&num=200&order=1";
  36. let data = JSON.parse(request(listUrl)).data;
  37. playlists = playlists.concat(data.list)
  38. }
  39. }
  40. playlists.forEach(function(it) {
  41. d.push({
  42. title: it.title,
  43. url: it.file
  44. })
  45. });
  46. VOD.vod_play_from = "bookan";
  47. VOD.vod_play_url = d.map(function(it) {
  48. return it.title + "$" + it.url
  49. }).join("#");
  50. `,
  51. 搜索: '*',
  52. }